<div id="themes">
    <? echo $adminMenu->settings(); ?>
    <h2><? __('Themes administration'); ?> (<? echo $html->link(__('new theme',true),array('action'=>'add')); ?>)</h2>
    <? echo $pagination->create(null,'themes'); ?>
    <ul>
        <? foreach ($themes as $theme): ?>
        <li>
            <h3>
                    <? echo $theme['Theme']['name'];?>
                    <?
                    if(!empty($theme['Theme']['author'])) { ?>
                        <?__('author'); ?>
                        <?
                        if(!empty($theme['Theme']['homepage'])) {
                            echo $html->link($theme['Theme']['author'],$theme['Theme']['homepage'],array('target'=>'new'));
                        } else {
                            e($theme['Theme']['author']);
                        }
                    }
                    ?>
            </h3>
            <div class="theme_detail">
                    <? if($theme['Theme']['description']) echo $theme['Theme']['description']; ?>
                <p>
                        <? echo ife($theme['Theme']['active'],__('Active',true),$html->link(__('Activate',true),array('action'=>'switchto',$theme['Theme']['id']))); ?>
                        <? echo $html->link(__('Edit information',true),array('action'=>'edit',$theme['Theme']['id'])); ?>
                        <? echo $html->link(__('Delete',true),array('action'=>'delete',$theme['Theme']['id'])); ?>
                </p>
            </div>
            <div class="theme_preview"><? echo $html->image(DS.'themed'.DS.$theme['Theme']['folder'].DS.'img'.DS.'preview.png',array('alt'=>__('preview',true))); ?></div>
            <br clear="all" />
        </li>
        <? endforeach; ?>
    </ul>

    <? echo $pagination->create(null,'themes'); ?>
</div>